Conventional compilers translate source code into object code for execution by a computer. Many conventional compilers are implemented as software on a conventional computer system, such as the Turbo C++ compiler commercially available from Borland International of Scotts Valley, Calif. running under the MS-DOS operating system commercially available from Microsoft Corporation of Redmond, Wash.
As shown in FIG. 1, a conventional computer system includes a processor 110 coupled to a first storage device 112 such as a memory, and a second storage device 114 such as a disk storage system. A user may interact with the system via a keyboard 116, mouse 118 and a monitor 120. Computer program product reader 107, such as a memory, hard drive, floppy disk drive or CD-ROM drive can is coupled to processor 101 to allow computer readable program code devices 97 such as encoded bits of a computer program product 99 such as a memory, hard disk, floppy disk, CD-ROM or other storage device to be input to processor 101 and stored in memory 108 and/or disk storage 103 for use in controlling the operation of the computer system 109 when computer program product 99 is inserted into slot 98 of computer program product reader 107. An operating system is loaded into memory 108 or disk storage 103 or a combination of memory 108 and disk storage 103 and instructs processor 101 to load and execute compilers or other applications described below. Many conventional compilers or other applications are distributed on computer program products 99, such as diskettes, storage devices such as ROMs or storage devices such as disk storage system 114, each containing computer readable code devices 97 which cause the computer system 109 operate in a particular manner such as is described herein when a copy of the code devices is loaded into the computer system 109.
Many compilers also detect the presence of errors in the source code. Some conventional compilers provide a listing of all errors in the source code to allow the programmer to see many errors simultaneously. FIG. 2 shows the output of one such conventional compiler. Error messages 212, 214 are located in a build output window 210 of the compiler, although other compilers utilize other output display methods. Error messages 212, 214 each instruct the user that a symbol was undefined. This capability allows the programmer to locate and correct several errors simultaneously. For example by defining one symbol, errors corresponding to error messages 212 and 214 may be simultaneously corrected. Thus, similar or related errors may be easily corrected. However, to correct each error, the source code location for each error must be identified to allow the user to view the error. If the meaning or cause of the error 4 is not apparent, the user may have to search information using a help facility. Some compilers assist the use in this process by providing information such as the file name and source code line number to allow the user to locate the error using an editor, or by suggesting a search topic to use to locate the relevant information in the help facility. Error messages 212, 214 provide the file name, line number and search topic for each error. The user may have to start the source code file editor or help facility, and then manually locate the line or topic.
Some compilers, such as the conventional Delphi Pascal compiler commercially available from Borland International of Scotts Valley, Calif., locate errors sequentially, one error at a time. Rather than displaying a large number of errors simultaneously, these compilers utilize an integrated editor to display a portion of the source code containing the first sequential error, highlight the source code line containing the error and display an error explanation at the bottom of the screen. The user corrects one error and directs the compiler to recompile the source code, which recompiles or continues compiling at the location of the corrected error until the next source code error is reached or the compiler completes the compilation successfully.
Both types of editors require the programmer to utilize a separate help facility to locate help information relevant to each error. This makes the process of correcting more difficult errors for which help is required more cumbersome, because the user must run the help facility and locate the most relevant help information.
A stack is stored into memory 108 or disk storage 103 or a combination of both. The processor 101 uses the stack to remember the addresses of programs or instructions that it has executed and local arguments used to invoke a subroutine. When it executes a subroutine, the processor 102 reads the stack to send the arguments for the subroutine. After executing the subroutine, the processor 102 reads the stack to determine the return address in the program invoking the subroutine.
The stack provides the control flow of a program that is used by programmers for debugging the program. However, as configured, the stack insufficiently describes the control flow for the programmer. The stack typically is mapped onto a view of the source code for the program. Most debuggers provide a separate command that allows the programmer to view the source code associated with a particular stack frame.
This type of debugger requires the programmer to select a separate command to display the source code corresponding to the stack frame. This makes the process of debugging errors for which reviewing the stack frame is required more cumbersome, because the user must select the separate command and locate the relevant source code.